package jeecg.httpsock;

public class StringParse {

	
	public static void main(String[] args) {
		String str = "GET /index.html HTTP/1.1	Host: 127.0.0.1:8889";
		new StringParse().parserUri(str);
	}
	
	
	 private String parserUri(String requestData) {  
	        int index1, index2;  
	        index1 = requestData.indexOf(' ');  
	        if(index1 != -1) {  
	            index2 = requestData.indexOf(' ', index1 + 1);  
	            if(index2 > index1) {  
	                return requestData.substring(index1 + 1, index2);  
	            }  
	        }  
	        return null;  
	    }  
}
